package com.icloud.system.boot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.icloud.system.boot.dto.AdminPermissionSaveDto;
import com.icloud.system.boot.model.AdminPermission;
import com.icloud.system.boot.vo.AdminPermissionTreeVo;

import java.util.List;
import java.util.Map;


/**
 * 后台账户权限service
 */
public interface AdminPermissionService extends IService<AdminPermission> {

    /**
     * 获取权限角色规则
     */
    Map<Object, Object> getPermissionRolesMap();

    /**
     * 添加权限
     */
    void addPermission(AdminPermissionSaveDto dto);

    /**
     * 初始化权限角色规则
     */
    Map<String, List<String>> initPermissionRolesMap();

    /**
     * 删除权限
     */
    void deletePermission(Long permissionId);

    /**
     * 获取权限数据
     * @param isIncludeDisable 是否包含禁用数据
     */
    List<AdminPermissionTreeVo> getTreePermission(Boolean isIncludeDisable);

    /**
     * 批量设置权限状态
     */
    void batchSetPermissionStatus(List<Long> permissionIds, String state);


}
